<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ADC: ADC.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ADC
   &#160;<span id="projectnumber">8.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_a_d_c_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">ADC.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Teensy 3.x, LC ADC library</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * https://github.com/pedvide/ADC</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * Copyright (c) 2015 Pedro Villanueva</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * a copy of this software and associated documentation files (the</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * &quot;Software&quot;), to deal in the Software without restriction, including</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * without limitation the rights to use, copy, modify, merge, publish,</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * distribute, sublicense, and/or sell copies of the Software, and to</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * permit persons to whom the Software is furnished to do so, subject to</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> * included in all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment">/* ADC.h: Control for one (Teensy 3.0, LC) or two ADC modules (Teensy 3.1).</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="comment">/* TODO</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="comment">* - Function to measure more that 1 pin consecutively (stream?)</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="comment">*</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="comment">* bugs:</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="comment">* - comparison values in 16 bit differential mode are twice what they should be</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#ifndef ADC_H</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#define ADC_H</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#define ADC_0 0</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#define ADC_1 1</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment">// include ADC module class</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;ADC_Module.h&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_a_d_c.html">   53</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_a_d_c.html">ADC</a></div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <a class="code" href="class_a_d_c.html#a60b6e21403b1f30984f63832c0562960">ADC</a>();</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;        <span class="comment">// create both adc objects</span></div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">   64</a></span>&#160;        <a class="code" href="class_a_d_c___module.html">ADC_Module</a> *<span class="keyword">const</span> <a class="code" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a>; <span class="comment">// adc object pointer</span></div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">        #if ADC_NUM_ADCS&gt;1</span></div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        <a class="code" href="class_a_d_c___module.html">ADC_Module</a> *<span class="keyword">const</span> <a class="code" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a>; <span class="comment">// adc object pointer</span></div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">        #endif</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ae66fb96c6b11156d714315ce6380e8b0">setReference</a>(uint8_t type, int8_t adc_num = -1);</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#afb4cead11eaa367165b40c8afc62e23d">setResolution</a>(uint8_t bits, int8_t adc_num = -1);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;        uint8_t <a class="code" href="class_a_d_c.html#a7280bdee747b978de83923fcfa90cba1">getResolution</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;        uint32_t <a class="code" href="class_a_d_c.html#a45c14b6ec1e956d12f34a99354559a43">getMaxValue</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a004d0b11f4bf0ad8328fdf1a7e2897b0">setConversionSpeed</a>(uint8_t speed, int8_t adc_num = -1);</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a6e01908bf556b00a73023eaddfe8e67f">setSamplingSpeed</a>(uint8_t speed, int8_t adc_num = -1);</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a6fd39809addc247f13004687d201003d">setAveraging</a>(uint8_t num, int8_t adc_num = -1);</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a55c8f57d2b3be4eb1216d45f652bc9c0">enableInterrupts</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a269ea8bf6891c3095eea3b9d6decce67">disableInterrupts</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a1bc9f7f1a0be0e38e9e6f517db8b2da7">enableDMA</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ac53578061bc8bbbd1652b718c6032d07">disableDMA</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a1987df39ccda1ce923eca878b3816383">enableCompare</a>(int16_t compValue, <span class="keywordtype">bool</span> greaterThan, int8_t adc_num = -1);</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#aa5b39a0ee459618f6b95cf4e48f77528">enableCompareRange</a>(int16_t lowerLimit, int16_t upperLimit, <span class="keywordtype">bool</span> insideRange, <span class="keywordtype">bool</span> inclusive, int8_t adc_num = -1);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a3f511deae378e46a4a9ec80af90bf723">disableCompare</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ace2f33764eff19fca2b1bea444a14819">enablePGA</a>(uint8_t gain, int8_t adc_num = -1);</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;        uint8_t <a class="code" href="class_a_d_c.html#aaea8da73b589edbd9e3e501c1e11c398">getPGA</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ab9cb3e1c0ee39b45b4b84630606d85e1">disablePGA</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a564c5be3181c2b4ccca3fefc484832cb">isConverting</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a5c508c2333310a834ca2f7cf59079807">isComplete</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a1bd89979194f6c9b0aa08463373aaa15">isDifferential</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a4bf6474dd2ec0b75269e8fdb268f2c03">isContinuous</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#aaf6079870b115d8b029d3613d44091dd">analogRead</a>(uint8_t pin, int8_t adc_num = -1);</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#aec3464cdb697f89cf162813b00b2e965">analogReadDifferential</a>(uint8_t pinP, uint8_t pinN, int8_t adc_num = -1);</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a113479488fae5f5407f884dd95fbec72">startSingleRead</a>(uint8_t pin, int8_t adc_num = -1);</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#ac1016c1d107118a0064c2b627dbd831b">startSingleDifferential</a>(uint8_t pinP, uint8_t pinN, int8_t adc_num = -1);</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452">readSingle</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#ad592f87ec644457b5056ae41c645ac0a">startContinuous</a>(uint8_t pin, int8_t adc_num = -1);</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#ae6179fc2e5ca7de1b0a3eb1f36985885">startContinuousDifferential</a>(uint8_t pinP, uint8_t pinN, int8_t adc_num = -1);</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;        <span class="keywordtype">int</span> <a class="code" href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819">analogReadContinuous</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#a436e52cf82ca735f636899de670a2f0c">stopContinuous</a>(int8_t adc_num = -1);</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;</div><div class="line"><a name="l00321"></a><span class="lineno"><a class="line" href="struct_a_d_c_1_1_sync__result.html">  321</a></span>&#160;        <span class="keyword">struct </span><a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>{</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;            int32_t result_adc0, result_adc1;</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;        };</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">analogSynchronizedRead</a>(uint8_t pin0, uint8_t pin1);</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;</div><div class="line"><a name="l00336"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a13b01aabc3f0560ceb822a04bf936022">  336</a></span>&#160;        <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#a13b01aabc3f0560ceb822a04bf936022">analogSyncRead</a>(uint8_t pin0, uint8_t pin1) __attribute__((always_inline)) {<span class="keywordflow">return</span> <a class="code" href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">analogSynchronizedRead</a>(pin0, pin1);}</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;        <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">analogSynchronizedReadDifferential</a>(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N);</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;</div><div class="line"><a name="l00347"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a0fc73bc95f8186f524773d9b0282bbf3">  347</a></span>&#160;        <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#a0fc73bc95f8186f524773d9b0282bbf3">analogSyncReadDifferential</a>(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N) __attribute__((always_inline)) {</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;            <span class="keywordflow">return</span> <a class="code" href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">analogSynchronizedReadDifferential</a>(pin0P, pin0N, pin1P, pin1N);</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        }</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#acbdb0f3a7419e5a0cd8b2c031dc8b9d7">startSynchronizedSingleRead</a>(uint8_t pin0, uint8_t pin1);</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a9cebd13de5da420591c779916865824a">startSynchronizedSingleDifferential</a>(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N);</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a">readSynchronizedSingle</a>();</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#af50305b76bf8798da1dd26f654b4f0e3">startSynchronizedContinuous</a>(uint8_t pin0, uint8_t pin1);</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_a_d_c.html#a29851ff11635dcd85cff21a92271b571">startSynchronizedContinuousDifferential</a>(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N);</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;        <a class="code" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a> <a class="code" href="class_a_d_c.html#acd10f3bc117a244e70e53c3489aa97bc">readSynchronizedContinuous</a>();</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_a_d_c.html#ac2070250dd4d557b27ec0f4f2b360f21">stopSynchronizedContinuous</a>();</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        <span class="comment">// should this be a constexpr?</span></div><div class="line"><a name="l00399"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a7d9a0a2e047047c5148b8b4ed13736de">  399</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#a7d9a0a2e047047c5148b8b4ed13736de">channel2sc1aADC0</a>[44];</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;<span class="preprocessor">        #if ADC_NUM_ADCS&gt;1</span></div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#a771218b6e00b24c3eee1446e6e480d9f">channel2sc1aADC1</a>[44];</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;<span class="preprocessor">        #endif</span></div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;</div><div class="line"><a name="l00406"></a><span class="lineno"><a class="line" href="class_a_d_c.html#ac83f0521b05578ac1faf0966a3128f33">  406</a></span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#ac83f0521b05578ac1faf0966a3128f33">sc1a2channelADC0</a>[44];</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;<span class="preprocessor">        #if ADC_NUM_ADCS&gt;1</span></div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> uint8_t <a class="code" href="class_a_d_c.html#a8769995229f5dc1f8dc4191eb97f9e09">sc1a2channelADC1</a>[44];</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;<span class="preprocessor">        #endif</span></div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;        <span class="comment">// defined in ADC_Module.h</span></div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;<span class="comment">//        struct ADC_NLIST {</span></div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;<span class="comment">//            uint8_t pin, sc1a;</span></div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;<span class="comment">//        };</span></div><div class="line"><a name="l00418"></a><span class="lineno"><a class="line" href="class_a_d_c.html#a3ac941166af84754393ce2e3006a1c16">  418</a></span>&#160;<span class="comment"></span>        <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a> <a class="code" href="class_a_d_c.html#a3ac941166af84754393ce2e3006a1c16">diff_table_ADC0</a>[ADC_DIFF_PAIRS];</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;<span class="preprocessor">        #if ADC_NUM_ADCS&gt;1</span></div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a> <a class="code" href="class_a_d_c.html#ac75d6d8768a6def95664d8bb00ae502a">diff_table_ADC1</a>[ADC_DIFF_PAIRS];</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;<span class="preprocessor">        #endif</span></div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;        <span class="comment">// ADCs objects</span></div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        <a class="code" href="class_a_d_c___module.html">ADC_Module</a> adc0_obj;</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;<span class="preprocessor">        #if ADC_NUM_ADCS&gt;1</span></div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;        <a class="code" href="class_a_d_c___module.html">ADC_Module</a> adc1_obj;</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;<span class="preprocessor">        #endif</span></div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;        <span class="keyword">const</span> uint8_t num_ADCs = ADC_NUM_ADCS;</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;};</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;</div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;}</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;<span class="preprocessor">#endif // ADC_H</span></div><div class="ttc" id="class_a_d_c_html_a3f511deae378e46a4a9ec80af90bf723"><div class="ttname"><a href="class_a_d_c.html#a3f511deae378e46a4a9ec80af90bf723">ADC::disableCompare</a></div><div class="ttdeci">void disableCompare(int8_t adc_num=-1)</div><div class="ttdoc">Disable the compare function. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:426</div></div>
<div class="ttc" id="class_a_d_c_html_ac53578061bc8bbbd1652b718c6032d07"><div class="ttname"><a href="class_a_d_c.html#ac53578061bc8bbbd1652b718c6032d07">ADC::disableDMA</a></div><div class="ttdeci">void disableDMA(int8_t adc_num=-1)</div><div class="ttdoc">Disable ADC DMA request. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:372</div></div>
<div class="ttc" id="class_a_d_c_html_acd10f3bc117a244e70e53c3489aa97bc"><div class="ttname"><a href="class_a_d_c.html#acd10f3bc117a244e70e53c3489aa97bc">ADC::readSynchronizedContinuous</a></div><div class="ttdeci">Sync_result readSynchronizedContinuous()</div><div class="ttdoc">Returns the values of both ADCs. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:1270</div></div>
<div class="ttc" id="class_a_d_c_html_a1bd89979194f6c9b0aa08463373aaa15"><div class="ttname"><a href="class_a_d_c.html#a1bd89979194f6c9b0aa08463373aaa15">ADC::isDifferential</a></div><div class="ttdeci">bool isDifferential(int8_t adc_num=-1)</div><div class="ttdoc">Is the ADC in differential mode? </div><div class="ttdef"><b>Definition:</b> ADC.cpp:520</div></div>
<div class="ttc" id="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t_html"><div class="ttname"><a href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a></div><div class="ttdoc">Dictionary with the differential pins as keys and the SC1A number as values. </div><div class="ttdef"><b>Definition:</b> ADC_Module.h:440</div></div>
<div class="ttc" id="class_a_d_c_html_a8f6c4642e9e5400220452feeb6be13b8"><div class="ttname"><a href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">ADC::adc1</a></div><div class="ttdeci">ADC_Module *const adc1</div><div class="ttdoc">Object to control the ADC1. </div><div class="ttdef"><b>Definition:</b> ADC.h:67</div></div>
<div class="ttc" id="class_a_d_c_html_a7280bdee747b978de83923fcfa90cba1"><div class="ttname"><a href="class_a_d_c.html#a7280bdee747b978de83923fcfa90cba1">ADC::getResolution</a></div><div class="ttdeci">uint8_t getResolution(int8_t adc_num=-1)</div><div class="ttdoc">Returns the resolution of the ADC_Module. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:235</div></div>
<div class="ttc" id="class_a_d_c_html_ac2070250dd4d557b27ec0f4f2b360f21"><div class="ttname"><a href="class_a_d_c.html#ac2070250dd4d557b27ec0f4f2b360f21">ADC::stopSynchronizedContinuous</a></div><div class="ttdeci">void stopSynchronizedContinuous()</div><div class="ttdoc">Stops synchronous continuous conversion. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:1280</div></div>
<div class="ttc" id="class_a_d_c_html_aec3464cdb697f89cf162813b00b2e965"><div class="ttname"><a href="class_a_d_c.html#aec3464cdb697f89cf162813b00b2e965">ADC::analogReadDifferential</a></div><div class="ttdeci">int analogReadDifferential(uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</div><div class="ttdoc">Reads the differential analog value of two pins (pinP - pinN). </div><div class="ttdef"><b>Definition:</b> ADC.cpp:607</div></div>
<div class="ttc" id="class_a_d_c_html_a13b01aabc3f0560ceb822a04bf936022"><div class="ttname"><a href="class_a_d_c.html#a13b01aabc3f0560ceb822a04bf936022">ADC::analogSyncRead</a></div><div class="ttdeci">Sync_result analogSyncRead(uint8_t pin0, uint8_t pin1) __attribute__((always_inline))</div><div class="ttdoc">Same as analogSynchronizedRead. </div><div class="ttdef"><b>Definition:</b> ADC.h:336</div></div>
<div class="ttc" id="class_a_d_c_html_a60b6e21403b1f30984f63832c0562960"><div class="ttname"><a href="class_a_d_c.html#a60b6e21403b1f30984f63832c0562960">ADC::ADC</a></div><div class="ttdeci">ADC()</div><div class="ttdef"><b>Definition:</b> ADC.cpp:171</div></div>
<div class="ttc" id="class_a_d_c_html_a564c5be3181c2b4ccca3fefc484832cb"><div class="ttname"><a href="class_a_d_c.html#a564c5be3181c2b4ccca3fefc484832cb">ADC::isConverting</a></div><div class="ttdeci">bool isConverting(int8_t adc_num=-1)</div><div class="ttdoc">Is the ADC converting at the moment? </div><div class="ttdef"><b>Definition:</b> ADC.cpp:489</div></div>
<div class="ttc" id="class_a_d_c_html_a0d5b4dd16bbb03082daeeaadafec2474"><div class="ttname"><a href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">ADC::adc0</a></div><div class="ttdeci">ADC_Module *const adc0</div><div class="ttdoc">Object to control the ADC0. </div><div class="ttdef"><b>Definition:</b> ADC.h:64</div></div>
<div class="ttc" id="struct_a_d_c_1_1_sync__result_html"><div class="ttname"><a href="struct_a_d_c_1_1_sync__result.html">ADC::Sync_result</a></div><div class="ttdoc">Struct for synchronous measurements. </div><div class="ttdef"><b>Definition:</b> ADC.h:321</div></div>
<div class="ttc" id="class_a_d_c_html_a436e52cf82ca735f636899de670a2f0c"><div class="ttname"><a href="class_a_d_c.html#a436e52cf82ca735f636899de670a2f0c">ADC::stopContinuous</a></div><div class="ttdeci">void stopContinuous(int8_t adc_num=-1)</div><div class="ttdoc">Stops continuous conversion. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:890</div></div>
<div class="ttc" id="class_a_d_c_html_ad592f87ec644457b5056ae41c645ac0a"><div class="ttname"><a href="class_a_d_c.html#ad592f87ec644457b5056ae41c645ac0a">ADC::startContinuous</a></div><div class="ttdeci">bool startContinuous(uint8_t pin, int8_t adc_num=-1)</div><div class="ttdoc">Starts continuous conversion on the pin. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:776</div></div>
<div class="ttc" id="class_a_d_c_html_aee7423bfcbb03465bb0bd1e3c6474452"><div class="ttname"><a href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452">ADC::readSingle</a></div><div class="ttdeci">int readSingle(int8_t adc_num=-1)</div><div class="ttdoc">Reads the analog value of a single conversion. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:760</div></div>
<div class="ttc" id="class_a_d_c_html_ac1016c1d107118a0064c2b627dbd831b"><div class="ttname"><a href="class_a_d_c.html#ac1016c1d107118a0064c2b627dbd831b">ADC::startSingleDifferential</a></div><div class="ttdeci">bool startSingleDifferential(uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</div><div class="ttdoc">Start a differential conversion between two pins (pinP - pinN) and enables interrupts. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:712</div></div>
<div class="ttc" id="class_a_d_c_html_a5c508c2333310a834ca2f7cf59079807"><div class="ttname"><a href="class_a_d_c.html#a5c508c2333310a834ca2f7cf59079807">ADC::isComplete</a></div><div class="ttdeci">bool isComplete(int8_t adc_num=-1)</div><div class="ttdoc">Is an ADC conversion ready? </div><div class="ttdef"><b>Definition:</b> ADC.cpp:507</div></div>
<div class="ttc" id="class_a_d_c_html_ae6179fc2e5ca7de1b0a3eb1f36985885"><div class="ttname"><a href="class_a_d_c.html#ae6179fc2e5ca7de1b0a3eb1f36985885">ADC::startContinuousDifferential</a></div><div class="ttdeci">bool startContinuousDifferential(uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</div><div class="ttdoc">Starts continuous conversion between the pins (pinP-pinN). </div><div class="ttdef"><b>Definition:</b> ADC.cpp:827</div></div>
<div class="ttc" id="class_a_d_c_html_aaf6079870b115d8b029d3613d44091dd"><div class="ttname"><a href="class_a_d_c.html#aaf6079870b115d8b029d3613d44091dd">ADC::analogRead</a></div><div class="ttdeci">int analogRead(uint8_t pin, int8_t adc_num=-1)</div><div class="ttdoc">Returns the analog value of the pin. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:553</div></div>
<div class="ttc" id="class_a_d_c___module_html"><div class="ttname"><a href="class_a_d_c___module.html">ADC_Module</a></div><div class="ttdef"><b>Definition:</b> ADC_Module.h:435</div></div>
<div class="ttc" id="class_a_d_c_html_a9cebd13de5da420591c779916865824a"><div class="ttname"><a href="class_a_d_c.html#a9cebd13de5da420591c779916865824a">ADC::startSynchronizedSingleDifferential</a></div><div class="ttdeci">bool startSynchronizedSingleDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdoc">Start a differential conversion between two pins (pin0P - pin0N) and (pin1P - pin1N) ...</div><div class="ttdef"><b>Definition:</b> ADC.cpp:1145</div></div>
<div class="ttc" id="class_a_d_c_html_ac83f0521b05578ac1faf0966a3128f33"><div class="ttname"><a href="class_a_d_c.html#ac83f0521b05578ac1faf0966a3128f33">ADC::sc1a2channelADC0</a></div><div class="ttdeci">static const uint8_t sc1a2channelADC0[44]</div><div class="ttdoc">Translate pin number to SC1A nomenclature for differential pins. </div><div class="ttdef"><b>Definition:</b> ADC.h:406</div></div>
<div class="ttc" id="class_a_d_c_html"><div class="ttname"><a href="class_a_d_c.html">ADC</a></div><div class="ttdef"><b>Definition:</b> ADC.h:53</div></div>
<div class="ttc" id="class_a_d_c_html_a0fc73bc95f8186f524773d9b0282bbf3"><div class="ttname"><a href="class_a_d_c.html#a0fc73bc95f8186f524773d9b0282bbf3">ADC::analogSyncReadDifferential</a></div><div class="ttdeci">Sync_result analogSyncReadDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N) __attribute__((always_inline))</div><div class="ttdoc">Same as analogSynchronizedReadDifferential. </div><div class="ttdef"><b>Definition:</b> ADC.h:347</div></div>
<div class="ttc" id="class_a_d_c_html_a55c8f57d2b3be4eb1216d45f652bc9c0"><div class="ttname"><a href="class_a_d_c.html#a55c8f57d2b3be4eb1216d45f652bc9c0">ADC::enableInterrupts</a></div><div class="ttdeci">void enableInterrupts(int8_t adc_num=-1)</div><div class="ttdoc">Enable interrupts. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:326</div></div>
<div class="ttc" id="class_a_d_c_html_a156bb3fe55e8155dc42fd7e9df1eaa55"><div class="ttname"><a href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">ADC::analogSynchronizedReadDifferential</a></div><div class="ttdeci">Sync_result analogSynchronizedReadDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdoc">Returns the differential analog values of both sets of pins, measured at the same time by the two ADC...</div><div class="ttdef"><b>Definition:</b> ADC.cpp:1001</div></div>
<div class="ttc" id="class_a_d_c_html_a113479488fae5f5407f884dd95fbec72"><div class="ttname"><a href="class_a_d_c.html#a113479488fae5f5407f884dd95fbec72">ADC::startSingleRead</a></div><div class="ttdeci">bool startSingleRead(uint8_t pin, int8_t adc_num=-1)</div><div class="ttdoc">Starts an analog measurement on the pin and enables interrupts. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:659</div></div>
<div class="ttc" id="class_a_d_c_html_a3ac941166af84754393ce2e3006a1c16"><div class="ttname"><a href="class_a_d_c.html#a3ac941166af84754393ce2e3006a1c16">ADC::diff_table_ADC0</a></div><div class="ttdeci">static const ADC_Module::ADC_NLIST diff_table_ADC0[ADC_DIFF_PAIRS]</div><div class="ttdoc">Translate differential pin number to SC1A nomenclature. </div><div class="ttdef"><b>Definition:</b> ADC.h:418</div></div>
<div class="ttc" id="class_a_d_c_html_aa5b39a0ee459618f6b95cf4e48f77528"><div class="ttname"><a href="class_a_d_c.html#aa5b39a0ee459618f6b95cf4e48f77528">ADC::enableCompareRange</a></div><div class="ttdeci">void enableCompareRange(int16_t lowerLimit, int16_t upperLimit, bool insideRange, bool inclusive, int8_t adc_num=-1)</div><div class="ttdoc">Enable the compare function to a range. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:412</div></div>
<div class="ttc" id="class_a_d_c_html_a29851ff11635dcd85cff21a92271b571"><div class="ttname"><a href="class_a_d_c.html#a29851ff11635dcd85cff21a92271b571">ADC::startSynchronizedContinuousDifferential</a></div><div class="ttdeci">bool startSynchronizedContinuousDifferential(uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</div><div class="ttdoc">Starts a continuous differential conversion in both ADCs simultaneously. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:1240</div></div>
<div class="ttc" id="class_a_d_c_html_afb4cead11eaa367165b40c8afc62e23d"><div class="ttname"><a href="class_a_d_c.html#afb4cead11eaa367165b40c8afc62e23d">ADC::setResolution</a></div><div class="ttdeci">void setResolution(uint8_t bits, int8_t adc_num=-1)</div><div class="ttdoc">Change the resolution of the measurement. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:221</div></div>
<div class="ttc" id="class_a_d_c_html_a38d941542bbdbc20c1b9e26a5051094a"><div class="ttname"><a href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a">ADC::readSynchronizedSingle</a></div><div class="ttdeci">Sync_result readSynchronizedSingle()</div><div class="ttdoc">Reads the analog value of a single conversion. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:1192</div></div>
<div class="ttc" id="class_a_d_c_html_a771218b6e00b24c3eee1446e6e480d9f"><div class="ttname"><a href="class_a_d_c.html#a771218b6e00b24c3eee1446e6e480d9f">ADC::channel2sc1aADC1</a></div><div class="ttdeci">static const uint8_t channel2sc1aADC1[44]</div><div class="ttdoc">Translate pin number to SC1A nomenclature. </div><div class="ttdef"><b>Definition:</b> ADC.h:402</div></div>
<div class="ttc" id="class_a_d_c_html_ace2f33764eff19fca2b1bea444a14819"><div class="ttname"><a href="class_a_d_c.html#ace2f33764eff19fca2b1bea444a14819">ADC::enablePGA</a></div><div class="ttdeci">void enablePGA(uint8_t gain, int8_t adc_num=-1)</div><div class="ttdoc">Enable and set PGA. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:446</div></div>
<div class="ttc" id="class_a_d_c_html_a7d9a0a2e047047c5148b8b4ed13736de"><div class="ttname"><a href="class_a_d_c.html#a7d9a0a2e047047c5148b8b4ed13736de">ADC::channel2sc1aADC0</a></div><div class="ttdeci">static const uint8_t channel2sc1aADC0[44]</div><div class="ttdoc">Translate pin number to SC1A nomenclature. </div><div class="ttdef"><b>Definition:</b> ADC.h:399</div></div>
<div class="ttc" id="class_a_d_c_html_a8769995229f5dc1f8dc4191eb97f9e09"><div class="ttname"><a href="class_a_d_c.html#a8769995229f5dc1f8dc4191eb97f9e09">ADC::sc1a2channelADC1</a></div><div class="ttdeci">static const uint8_t sc1a2channelADC1[44]</div><div class="ttdoc">Translate pin number to SC1A nomenclature for differential pins. </div><div class="ttdef"><b>Definition:</b> ADC.h:409</div></div>
<div class="ttc" id="class_a_d_c_html_acbdb0f3a7419e5a0cd8b2c031dc8b9d7"><div class="ttname"><a href="class_a_d_c.html#acbdb0f3a7419e5a0cd8b2c031dc8b9d7">ADC::startSynchronizedSingleRead</a></div><div class="ttdeci">bool startSynchronizedSingleRead(uint8_t pin0, uint8_t pin1)</div><div class="ttdoc">Starts an analog measurement at the same time on the two ADC modules. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:1094</div></div>
<div class="ttc" id="class_a_d_c_html_ab9cb3e1c0ee39b45b4b84630606d85e1"><div class="ttname"><a href="class_a_d_c.html#ab9cb3e1c0ee39b45b4b84630606d85e1">ADC::disablePGA</a></div><div class="ttdeci">void disablePGA(int8_t adc_num=-1)</div><div class="ttdoc">Disable PGA. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:475</div></div>
<div class="ttc" id="class_a_d_c_html_af50305b76bf8798da1dd26f654b4f0e3"><div class="ttname"><a href="class_a_d_c.html#af50305b76bf8798da1dd26f654b4f0e3">ADC::startSynchronizedContinuous</a></div><div class="ttdeci">bool startSynchronizedContinuous(uint8_t pin0, uint8_t pin1)</div><div class="ttdoc">Starts a continuous conversion in both ADCs simultaneously. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:1208</div></div>
<div class="ttc" id="class_a_d_c_html_a6fd39809addc247f13004687d201003d"><div class="ttname"><a href="class_a_d_c.html#a6fd39809addc247f13004687d201003d">ADC::setAveraging</a></div><div class="ttdeci">void setAveraging(uint8_t num, int8_t adc_num=-1)</div><div class="ttdoc">Set the number of averages. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:308</div></div>
<div class="ttc" id="class_a_d_c_html_ac75d6d8768a6def95664d8bb00ae502a"><div class="ttname"><a href="class_a_d_c.html#ac75d6d8768a6def95664d8bb00ae502a">ADC::diff_table_ADC1</a></div><div class="ttdeci">static const ADC_Module::ADC_NLIST diff_table_ADC1[ADC_DIFF_PAIRS]</div><div class="ttdoc">Translate differential pin number to SC1A nomenclature. </div><div class="ttdef"><b>Definition:</b> ADC.h:421</div></div>
<div class="ttc" id="class_a_d_c_html_aaea8da73b589edbd9e3e501c1e11c398"><div class="ttname"><a href="class_a_d_c.html#aaea8da73b589edbd9e3e501c1e11c398">ADC::getPGA</a></div><div class="ttdeci">uint8_t getPGA(int8_t adc_num=-1)</div><div class="ttdoc">Returns the PGA level. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:462</div></div>
<div class="ttc" id="class_a_d_c_html_a45c14b6ec1e956d12f34a99354559a43"><div class="ttname"><a href="class_a_d_c.html#a45c14b6ec1e956d12f34a99354559a43">ADC::getMaxValue</a></div><div class="ttdeci">uint32_t getMaxValue(int8_t adc_num=-1)</div><div class="ttdoc">Returns the maximum value for a measurement: 2^res-1. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:249</div></div>
<div class="ttc" id="class_a_d_c_html_a269ea8bf6891c3095eea3b9d6decce67"><div class="ttname"><a href="class_a_d_c.html#a269ea8bf6891c3095eea3b9d6decce67">ADC::disableInterrupts</a></div><div class="ttdeci">void disableInterrupts(int8_t adc_num=-1)</div><div class="ttdoc">Disable interrupts. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:340</div></div>
<div class="ttc" id="class_a_d_c_html_a749efc928425a1eea18341ccfafd1819"><div class="ttname"><a href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819">ADC::analogReadContinuous</a></div><div class="ttdeci">int analogReadContinuous(int8_t adc_num=-1)</div><div class="ttdoc">Reads the analog value of a continuous conversion. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:877</div></div>
<div class="ttc" id="class_a_d_c_html_a1987df39ccda1ce923eca878b3816383"><div class="ttname"><a href="class_a_d_c.html#a1987df39ccda1ce923eca878b3816383">ADC::enableCompare</a></div><div class="ttdeci">void enableCompare(int16_t compValue, bool greaterThan, int8_t adc_num=-1)</div><div class="ttdoc">Enable the compare function to a single value. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:392</div></div>
<div class="ttc" id="class_a_d_c_html_ac8067db45057f691e664f414d1376d1e"><div class="ttname"><a href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">ADC::analogSynchronizedRead</a></div><div class="ttdeci">Sync_result analogSynchronizedRead(uint8_t pin0, uint8_t pin1)</div><div class="ttdoc">Returns the analog values of both pins, measured at the same time by the two ADC modules. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:916</div></div>
<div class="ttc" id="class_a_d_c_html_a6e01908bf556b00a73023eaddfe8e67f"><div class="ttname"><a href="class_a_d_c.html#a6e01908bf556b00a73023eaddfe8e67f">ADC::setSamplingSpeed</a></div><div class="ttdeci">void setSamplingSpeed(uint8_t speed, int8_t adc_num=-1)</div><div class="ttdoc">Sets the sampling speed. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:289</div></div>
<div class="ttc" id="class_a_d_c_html_a004d0b11f4bf0ad8328fdf1a7e2897b0"><div class="ttname"><a href="class_a_d_c.html#a004d0b11f4bf0ad8328fdf1a7e2897b0">ADC::setConversionSpeed</a></div><div class="ttdeci">void setConversionSpeed(uint8_t speed, int8_t adc_num=-1)</div><div class="ttdoc">Sets the conversion speed (changes the ADC clock, ADCK) </div><div class="ttdef"><b>Definition:</b> ADC.cpp:268</div></div>
<div class="ttc" id="class_a_d_c_html_a1bc9f7f1a0be0e38e9e6f517db8b2da7"><div class="ttname"><a href="class_a_d_c.html#a1bc9f7f1a0be0e38e9e6f517db8b2da7">ADC::enableDMA</a></div><div class="ttdeci">void enableDMA(int8_t adc_num=-1)</div><div class="ttdoc">Enable DMA request. </div><div class="ttdef"><b>Definition:</b> ADC.cpp:358</div></div>
<div class="ttc" id="class_a_d_c_html_a4bf6474dd2ec0b75269e8fdb268f2c03"><div class="ttname"><a href="class_a_d_c.html#a4bf6474dd2ec0b75269e8fdb268f2c03">ADC::isContinuous</a></div><div class="ttdeci">bool isContinuous(int8_t adc_num=-1)</div><div class="ttdoc">Is the ADC in continuous mode? </div><div class="ttdef"><b>Definition:</b> ADC.cpp:533</div></div>
<div class="ttc" id="class_a_d_c_html_ae66fb96c6b11156d714315ce6380e8b0"><div class="ttname"><a href="class_a_d_c.html#ae66fb96c6b11156d714315ce6380e8b0">ADC::setReference</a></div><div class="ttdeci">void setReference(uint8_t type, int8_t adc_num=-1)</div><div class="ttdoc">Set the voltage reference you prefer, default is 3.3 V (VCC) </div><div class="ttdef"><b>Definition:</b> ADC.cpp:196</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>ADC.h</b></li>
    <li class="footer">Generated on Sun Jun 26 2016 16:42:58 for ADC by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
